#include <algorithm>
#include <iostream>
using namespace std;
const int N = 10;
double x[N], y[N], z[N];
int main()
{
    for (int i = 1; i <= 4; i++)
    {
        scanf("%lf%lf%lf", &x[i], &y[i], &z[i]);
    }
    double sum = x[2] * y[3] * z[4] + y[2] * z[3] * x[4] + x[3] * y[4] * z[2] - x[4] * y[3] * z[2] - x[3] * y[2] * z[4] - y[4] * z[3] * x[2];
    sum -= x[1] * y[3] * z[4] + y[1] * z[3] * x[4] + x[3] * y[4] * z[1] - x[4] * y[3] * z[1] - x[3] * y[1] * z[4] - y[4] * z[3] * x[1];
    sum += x[1] * y[2] * z[4] + y[1] * z[2] * x[4] + x[2] * y[4] * z[1] - x[4] * y[2] * z[1] - x[2] * y[1] * z[4] - y[4] * z[2] * x[1];
    sum -= x[1] * y[2] * z[3] + y[1] * z[2] * x[3] + x[2] * y[3] * z[1] - x[3] * y[2] * z[1] - x[2] * y[1] * z[3] - y[3] * z[2] * x[1];
    if (sum < 0)
        sum = (-sum) / 6;
    else
        sum = sum / 6;
    printf("%.12f\n", sum);
    return 0;
}